package com.kfirszt.elearning.persistence.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import com.kfirszt.elearning.dictionary.Province;

@Entity
@Table(name = "city")
public class City extends BaseEntity{

	private static final long serialVersionUID = 1L;
	
	@Column(name = "name")
	private String name;
	
	@Column(name = "province")
	@Enumerated(EnumType.STRING)
	private Province province;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Province getProvince() {
		return province;
	}

	public void setProvince(Province province) {
		this.province = province;
	} 
	
	@Override
	public String toString() {
		return province.getLabel() + ": " + name;
	}
}
